class AppResponse {
  bool? _ok;
  dynamic _data;
  Exception? _error;

  bool get ok => _ok ?? false;

  dynamic get data => _data;

  Exception? get error => _error ?? Exception();

  AppResponse.success(dynamic data) {
    _data = data;
    _ok = true;
  }

  AppResponse.failure(String? errorMsg) {
    _error = Exception(errorMsg);
  }
}
